From: Florian Müllner Date: Tue, 19 Dec 2023 23:17:29 +0000 (+0100) Subject: extensions-app: Add compat code for older shell versions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~194 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7a9bfa27445ce5fef29ec44ab04ea315ca3fda15;p=gnome-shell.git extensions-app: Add compat code for older shell versions The Extensions app is also distributed as flatpak, so we cannot assume that its version matches the shell. In order to not show all extensions as disabled when running under a shell version that doesn't include the `enabled` property yet, add a fallback based on the current state. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004 Part-of: --- diff --git a/subprojects/extensions-app/js/extensionManager.js b/subprojects/extensions-app/js/extensionManager.js index 3f2e3bdcc..6c557a885 100644 --- a/subprojects/extensions-app/js/extensionManager.js +++ b/subprojects/extensions-app/js/extensionManager.js @@ -142,6 +142,10 @@ const Extension = GObject.registerClass({ this._state = state; this.notify('state'); + // Compat with older shell versions + if (this._enabled === undefined) + this.notify('enabled'); + if (this.hasError !== hadError) { this.notify('has-error'); this.notify('error'); @@ -203,6 +207,12 @@ const Extension = GObject.registerClass({ } get enabled() { + // Compat with older shell versions + if (this._enabled === undefined) { + return this.state === ExtensionState.ACTIVE || + this.state === ExtensionState.ACTIVATING; + } + return this._enabled; }